#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>

#include "app.h"

#define UNUSED(x) (void)x

jmp_buf concert_env;

int main(int argc, char *argv[])
{	
	int ret = 0;
	menu_funtion_p_t menu_funtion_p[MENU_NUM];
	struct app *app_p = NULL;

	UNUSED(argc);
	UNUSED(argv);

	app_p = init(menu_funtion_p);

	ret = setjmp(concert_env);
	if(ret != 1)
		run(app_p, menu_funtion_p);

	destroy(app_p, menu_funtion_p);

	return 0;
}
